import java.util.Arrays;

/**
 * @ClassName LC1913
 * @Author ykx
 * @Date 2024/3/20 15:48
 * @Version 1.0
 */
public class LC1913 {
    public int maxProductDifference(int[] nums) {
        Arrays.sort(nums);
        return nums[nums.length - 1] * nums[nums.length - 2] - nums[0] * nums[1];
    }
}
